"""
Testing Configuration
====================

Testing environment specific configuration settings.
Optimized for test isolation and speed.
"""

from . import TestingConfig

class Config(TestingConfig):
    """Testing configuration class."""
    
    # Testing mode
    TESTING = True
    DEBUG = True
    
    # Use in-memory SQLite for fast testing
    SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
    
    # Disable CSRF for testing
    WTF_CSRF_ENABLED = False
    
    # JWT configuration for testing
    JWT_ACCESS_TOKEN_EXPIRES = timedelta(minutes=30)
    
    # Cache configuration for testing
    CACHE_TYPE = 'null'
    
    # Rate limiting disabled for testing
    RATELIMIT_ENABLED = False
    
    # Logging configuration for testing
    LOGGING_CONFIG = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'default': {
                'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
            }
        },
        'handlers': {
            'console': {
                'class': 'logging.StreamHandler',
                'stream': 'ext://sys.stdout',
                'formatter': 'default'
            }
        },
        'root': {
            'level': 'DEBUG',
            'handlers': ['console']
        }
    }
    
    # Test-specific settings
    LOGIN_DISABLED = False
    MAIL_SUPPRESS_SEND = True